package com.sudo.client.task;

import com.sudo.rpc.api.annotation.TaskComponent;
import com.sudo.rpc.api.annotation.TaskNote;
import com.sudo.rpc.api.utils.RpcRes;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * 测试客户端
 *
 * @author DayDayUp
 * create on 2023-07-13
 **/
@Slf4j
@TaskComponent
public class TestService {

    @TaskNote(desc = "用户行为记录",params = "count(Integer,true,2,获取数据次数)|abc(String,true,bbb,获取abc)")
    public RpcRes test1(Map<String, Object> paramMap) {
        String countStr = paramMap.get("count").toString();
        String abc = paramMap.get("abc").toString();
        int count = Integer.parseInt(countStr);
        log.info("count = {}, abc = {}",count,abc);
        return RpcRes.ok(abc, "调用成功呢");
    }

}
